﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddAfficheInform.aspx.cs"
    Inherits="admin_AfficheInformSetting_AddAfficheInform" %>

<%@ Register Assembly="HtmlEditor" Namespace="HtmlEditor" TagPrefix="cc1" %>
<%@ Register TagPrefix="mck" TagName="TextBox" Src="~/CKEditor.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../../js/AfficheInformSetting.js"></script>
    <link rel="Stylesheet" type="text/css" href="../../Styles/right_style.css" />
    <script type="text/javascript" src="../../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
    <!--
    html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
    scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
    -->
    </style>
    <script type="text/javascript">
        function delSections() {
            document.getElementById("TxtSections").value = "";
            document.getElementById("HidSids").value = "";
        }

        function validateForm() {
            var sections = $("#HidSids");
            var title = $("#TxtTitle");
            var startTime = $("#TxtStart");
            var endTime = $("#TxtEnd");
            var content = $("#MyEditor");
            var flag = true;

            if (sections.val() == '') {
                alert("发送范围不能为空");
                flag = false;
            } else if (title.val() == '') {
                alert("标题不能为空");
                flag = false;
            } else if (startTime.val() == '') {
                alert("创建时间不能为空");
                flag = false;
            } else if (endTime.val() == '') {
                alert("终止时间不能为空");
                flag = false;
            } else if (content.val() == '') {
                alert("内容不能为空");
                flag = false;
            }
            return flag;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="sub_right_top">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="hdm_header">
            <div class="tb1_on">
                <h2 class="h2_icon">
                    新建公告通知</h2>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="hdm_footer">
            <div class="dengji_kong">
            </div>
            <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0"
                style="border-collapse: collapse; font-size: 12px;">
                <tr align="center">
                    <td colspan="3">
                        新建公告通知
                    </td>
                </tr>
                <tr>
                    <td width="100" align="center">
                        发送范围（部门）
                    </td>
                    <td>
                        <asp:TextBox ID="TxtSections" runat="server" BackColor="#E0E0E0" Height="40px" ReadOnly="True"
                            TextMode="MultiLine" Width="100%"></asp:TextBox>
                    </td>
                    <td width="60">
                        <input id="Button1" onclick="openAddSection()" style="width: 52px" type="button"
                            value="添加" />
                        <input id="Button3" onclick="javascript:delSections()" style="width: 52px; height: 24px"
                            type="button" value="清空" />
                    </td>
                </tr>
                <!--
            <tr id="upload" align="center">
                <td style="height: 21px; width: 108px;">附件:
                    </td>
                <td colspan="2" style="" align="left">
                    <asp:UpdatePanel ID="Upload" runat="server">
                        <ContentTemplate><asp:FileUpload ID="AffixFile" runat="server" Width="400px" /><br />
                    <asp:ListBox ID="ListBox1" runat="server" Width="328px" SelectionMode="Multiple"></asp:ListBox>
                    <asp:Button ID="BtnUpload" runat="server" OnClick="BtnUpload_Click" OnClientClick='hidUpload()'
                        Text="上传" Width="77px" />
                    <asp:Button ID="BtnDelFile" runat="server" OnClick="BtnDelFile_Click" OnClientClick="javascript:return checkDelFile('ListBox1')"
                        Text="删除" Width="68px" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    
                </td>
            </tr>
            -->
                <tr id="loading" style="display: none" align="center">
                    <td style="height: 21px; width: 108px;">
                    </td>
                    <td style="height: 21px; width: 400px;">
                        <asp:Panel ID="Panel1" runat="server" BackColor="#FFFFC0" BorderStyle="Double" Height="16px"
                            Width="100%">
                            <marquee class="loading" direction="right" scrollamount="5" scrolldelay="10">
                            <table cellpadding="2" width="100%">
                                <tr>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td>
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td> 
                                    <td bgcolor="#99cccc" style="width: 10%; height: 12px">
                                    </td> 
                                </tr>
                            </table>
                        </marquee>
                        </asp:Panel>
                    </td>
                    <td style="height: 21px;">
                    </td>
                </tr>
                <tr>
                    <td width="100" align="center">
                        标题
                    </td>
                    <td>
                        <asp:TextBox ID="TxtTitle" runat="server" Width="300px"></asp:TextBox>
                        <input id="HidSids" name="HidSids" type="hidden" />
                    </td>
                    <td width="60">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td width="100" align="center">
                        有效期
                    </td>
                    <td>
                        起始日期：
                        <asp:TextBox ID="TxtStart" runat="server" CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox>
                        <br />
                        结束日期：
                        <asp:TextBox ID="TxtEnd" runat="server" CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox>
                    </td>
                    <td width="60">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center">
                        <mck:TextBox ID="MyEditor" ClientIDMode="Static" runat="server" Toolbar="TarreBasic" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <div class="disk_queding_top">
                            <asp:Button ID="BtnSubmit" runat="server" OnClick="BtnSubmit_Click" OnClientClick="return validateForm()"
                                Text="" CssClass="tijiao_anniu tijiao_pad" /></div>
                        <div class="disk_queding_top">
                            <input id="Button5" onclick="location.href='Index.aspx'" style="width: 70px; height: 24px"
                                type="button" value="" class="fanhui_anniu" />
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
